import Vue from 'vue';
import Router from 'vue-router';
import { AuthGuard } from '@/utils';
import qs from 'qs';
import store from '@/store';
import { globalRoutes, indexRoutes} from '@/router';

Vue.use(Router);

const router = new Router({
    routes: [
                {
            path: '/appindexview/:appindexview?',
            beforeEnter: (to: any, from: any, next: any) => {
                const routerParamsName = 'appindexview';
                const params: any = {};
                if (to.params && to.params[routerParamsName]) {
                    Object.assign(params, qs.parse(to.params[routerParamsName], { delimiter: ';' }));
                }
                const url: string = '/appdata';
                const auth: Promise<any> = AuthGuard.getInstance().authGuard(url, params, store);
                auth.then(() => {
                    next();
                }).catch(() => {
                    next();
                });
            },
            meta: {  
                keepAlive:true,
                caption: '共富营平台',
                viewType: 'APPINDEX',
                parameters: [
                    { pathName: 'appindexview', parameterName: 'appindexview' },
                ],
                requireAuth: true,
            },
            component: () => import('@pages/ungroup/app-index-view/app-index-view.vue'),
        },
        {
            path: '/viewshell/:viewshell?',
            beforeEnter: (to: any, from: any, next: any) => {
                const routerParamsName = 'appindexview';
                const params: any = {};
                if (to.params && to.params[routerParamsName]) {
                    Object.assign(params, qs.parse(to.params[routerParamsName], { delimiter: ';' }));
                }
                const url: string = '/appdata';
                const auth: Promise<any> = AuthGuard.getInstance().authGuard(url, params, store);
                auth.then(() => {
                    next();
                }).catch(() => {
                    next();
                });
            },
            meta: {
                parameters: [
                    { pathName: 'viewshell', parameterName: 'viewshell' },
                ],
            },
            component: () => import('@/components/view-shell/view-shell.vue'),
            children: [
                {
                    path: 'notice_infos/:notice_info?/mymobmdview',
                    name: 'notice_info_mymobmdview',
                    meta: {
                        caption: 'notice_info.views.mymobmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'notice_infos', parameterName: 'notice_info' },
                            { pathName: 'mymobmdview', parameterName: 'mymobmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/notice-info-my-mob-mdview/notice-info-my-mob-mdview.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/indmobeditview',
                    name: 'shop_examine_indmobeditview',
                    meta: {
                        caption: 'shop_examine.views.indmobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'indmobeditview', parameterName: 'indmobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-ind-mob-edit-view/shop-examine-ind-mob-edit-view.vue'),
                },
                {
                    path: 'task_infos/:task_info?/taskinfomobmdview9',
                    name: 'task_info_taskinfomobmdview9',
                    meta: {
                        caption: 'task_info.views.taskinfomobmdview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'task_infos', parameterName: 'task_info' },
                            { pathName: 'taskinfomobmdview9', parameterName: 'taskinfomobmdview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/task-info-task-info-mob-mdview9/task-info-task-info-mob-mdview9.vue'),
                },
                {
                    path: 'task_infos/:task_info?/task_evaluates/:task_evaluate?/mobeditview',
                    name: 'task_evaluate_mobeditview',
                    meta: {
                        caption: 'task_evaluate.views.mobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'task_infos', parameterName: 'task_info' },
                            { pathName: 'task_evaluates', parameterName: 'task_evaluate' },
                            { pathName: 'mobeditview', parameterName: 'mobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/task-evaluate-mob-edit-view/task-evaluate-mob-edit-view.vue'),
                },
                {
                    path: 'task_evaluates/:task_evaluate?/mobeditview',
                    name: 'task_evaluate_mobeditview',
                    meta: {
                        caption: 'task_evaluate.views.mobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'task_evaluates', parameterName: 'task_evaluate' },
                            { pathName: 'mobeditview', parameterName: 'mobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/task-evaluate-mob-edit-view/task-evaluate-mob-edit-view.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/resubmitmobeditview',
                    name: 'shop_examine_resubmitmobeditview',
                    meta: {
                        caption: 'shop_examine.views.resubmitmobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'resubmitmobeditview', parameterName: 'resubmitmobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-re-submit-mob-edit-view/shop-examine-re-submit-mob-edit-view.vue'),
                },
                {
                    path: 'shop_infos/:shop_info?/shopmanamobmdview',
                    name: 'shop_info_shopmanamobmdview',
                    meta: {
                        caption: 'shop_info.views.shopmanamobmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_infos', parameterName: 'shop_info' },
                            { pathName: 'shopmanamobmdview', parameterName: 'shopmanamobmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-info-shop-mana-mob-mdview/shop-info-shop-mana-mob-mdview.vue'),
                },
                {
                    path: 'task_infos/:task_info?/shoptaskmamobmdview',
                    name: 'task_info_shoptaskmamobmdview',
                    meta: {
                        caption: 'task_info.views.shoptaskmamobmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'task_infos', parameterName: 'task_info' },
                            { pathName: 'shoptaskmamobmdview', parameterName: 'shoptaskmamobmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/task-info-shop-task-ma-mob-mdview/task-info-shop-task-ma-mob-mdview.vue'),
                },
                {
                    path: 'task_infos/:task_info?/noticemobeditview',
                    name: 'task_info_noticemobeditview',
                    meta: {
                        caption: 'task_info.views.noticemobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'task_infos', parameterName: 'task_info' },
                            { pathName: 'noticemobeditview', parameterName: 'noticemobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/task-info-notice-mob-edit-view/task-info-notice-mob-edit-view.vue'),
                },
                {
                    path: 'setupportalview',
                    name: 'setupportalview',
                    meta: {
                        caption: 'app.views.setupportalview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'setupportalview', parameterName: 'setupportalview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/ungroup/set-up-portal-view/set-up-portal-view.vue'),
                },
                {
                    path: 'order_details/:order_detail?/mobeditview',
                    name: 'order_detail_mobeditview',
                    meta: {
                        caption: 'order_detail.views.mobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'order_details', parameterName: 'order_detail' },
                            { pathName: 'mobeditview', parameterName: 'mobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/order-detail-mob-edit-view/order-detail-mob-edit-view.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/securityinfos/:securityinfo?/mobeditview9',
                    name: 'securityinfo_mobeditview9',
                    meta: {
                        caption: 'securityinfo.views.mobeditview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'securityinfos', parameterName: 'securityinfo' },
                            { pathName: 'mobeditview9', parameterName: 'mobeditview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/security-info-mob-edit-view9/security-info-mob-edit-view9.vue'),
                },
                {
                    path: 'securityinfos/:securityinfo?/mobeditview9',
                    name: 'securityinfo_mobeditview9',
                    meta: {
                        caption: 'securityinfo.views.mobeditview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'securityinfos', parameterName: 'securityinfo' },
                            { pathName: 'mobeditview9', parameterName: 'mobeditview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/security-info-mob-edit-view9/security-info-mob-edit-view9.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/notappmobeditview',
                    name: 'shop_examine_notappmobeditview',
                    meta: {
                        caption: 'shop_examine.views.notappmobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'notappmobeditview', parameterName: 'notappmobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-not-app-mob-edit-view/shop-examine-not-app-mob-edit-view.vue'),
                },
                {
                    path: 'task_infos/:task_info?/taskinfoshopmobeditview',
                    name: 'task_info_taskinfoshopmobeditview',
                    meta: {
                        caption: 'task_info.views.taskinfoshopmobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'task_infos', parameterName: 'task_info' },
                            { pathName: 'taskinfoshopmobeditview', parameterName: 'taskinfoshopmobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/task-info-task-info-shop-mob-edit-view/task-info-task-info-shop-mob-edit-view.vue'),
                },
                {
                    path: 'shop_stars/:shop_star?/mobmdview9',
                    name: 'shop_star_mobmdview9',
                    meta: {
                        caption: 'shop_star.views.mobmdview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_stars', parameterName: 'shop_star' },
                            { pathName: 'mobmdview9', parameterName: 'mobmdview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-star-mob-mdview9/shop-star-mob-mdview9.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/campmobeditview',
                    name: 'shop_examine_campmobeditview',
                    meta: {
                        caption: 'shop_examine.views.campmobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'campmobeditview', parameterName: 'campmobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-camp-mob-edit-view/shop-examine-camp-mob-edit-view.vue'),
                },
                {
                    path: 'shop_stars/:shop_star?/mgrmobmdview',
                    name: 'shop_star_mgrmobmdview',
                    meta: {
                        caption: 'shop_star.views.mgrmobmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_stars', parameterName: 'shop_star' },
                            { pathName: 'mgrmobmdview', parameterName: 'mgrmobmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-star-mgr-mob-mdview/shop-star-mgr-mob-mdview.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/auditmobmdview',
                    name: 'shop_examine_auditmobmdview',
                    meta: {
                        caption: 'shop_examine.views.auditmobmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'auditmobmdview', parameterName: 'auditmobmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-audit-mob-mdview/shop-examine-audit-mob-mdview.vue'),
                },
                {
                    path: 'task_infos/:task_info?/task_evaluates/:task_evaluate?/mobmdview9',
                    name: 'task_evaluate_mobmdview9',
                    meta: {
                        caption: 'task_evaluate.views.mobmdview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'task_infos', parameterName: 'task_info' },
                            { pathName: 'task_evaluates', parameterName: 'task_evaluate' },
                            { pathName: 'mobmdview9', parameterName: 'mobmdview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/task-evaluate-mob-mdview9/task-evaluate-mob-mdview9.vue'),
                },
                {
                    path: 'task_evaluates/:task_evaluate?/mobmdview9',
                    name: 'task_evaluate_mobmdview9',
                    meta: {
                        caption: 'task_evaluate.views.mobmdview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'task_evaluates', parameterName: 'task_evaluate' },
                            { pathName: 'mobmdview9', parameterName: 'mobmdview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/task-evaluate-mob-mdview9/task-evaluate-mob-mdview9.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/tjmobwfdynaactionview',
                    name: 'shop_examine_tjmobwfdynaactionview',
                    meta: {
                        caption: 'shop_examine.views.tjmobwfdynaactionview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'tjmobwfdynaactionview', parameterName: 'tjmobwfdynaactionview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-tjmob-wfdyna-action-view/shop-examine-tjmob-wfdyna-action-view.vue'),
                },
                {
                    path: 'manager_infos/:manager_info?/mymobeditview',
                    name: 'manager_info_mymobeditview',
                    meta: {
                        caption: 'manager_info.views.mymobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'manager_infos', parameterName: 'manager_info' },
                            { pathName: 'mymobeditview', parameterName: 'mymobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/manager-info-my-mob-edit-view/manager-info-my-mob-edit-view.vue'),
                },
                {
                    path: 'task_infos/:task_info?/student_infos/:student_info?/taskstudentmobmdview9',
                    name: 'student_info_taskstudentmobmdview9',
                    meta: {
                        caption: 'student_info.views.taskstudentmobmdview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'task_infos', parameterName: 'task_info' },
                            { pathName: 'student_infos', parameterName: 'student_info' },
                            { pathName: 'taskstudentmobmdview9', parameterName: 'taskstudentmobmdview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/student-info-task-student-mob-mdview9/student-info-task-student-mob-mdview9.vue'),
                },
                {
                    path: 'student_infos/:student_info?/taskstudentmobmdview9',
                    name: 'student_info_taskstudentmobmdview9',
                    meta: {
                        caption: 'student_info.views.taskstudentmobmdview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'student_infos', parameterName: 'student_info' },
                            { pathName: 'taskstudentmobmdview9', parameterName: 'taskstudentmobmdview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/student-info-task-student-mob-mdview9/student-info-task-student-mob-mdview9.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/agreemoboptionview',
                    name: 'shop_examine_agreemoboptionview',
                    meta: {
                        caption: 'shop_examine.views.agreemoboptionview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'agreemoboptionview', parameterName: 'agreemoboptionview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-agree-mob-option-view/shop-examine-agree-mob-option-view.vue'),
                },
                {
                    path: 'shop_stars/:shop_star?/evalmobeditview',
                    name: 'shop_star_evalmobeditview',
                    meta: {
                        caption: 'shop_star.views.evalmobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_stars', parameterName: 'shop_star' },
                            { pathName: 'evalmobeditview', parameterName: 'evalmobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-star-eval-mob-edit-view/shop-star-eval-mob-edit-view.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/securityinfos/:securityinfo?/mobmeditview9',
                    name: 'securityinfo_mobmeditview9',
                    meta: {
                        caption: 'securityinfo.views.mobmeditview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'securityinfos', parameterName: 'securityinfo' },
                            { pathName: 'mobmeditview9', parameterName: 'mobmeditview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/security-info-mob-medit-view9/security-info-mob-medit-view9.vue'),
                },
                {
                    path: 'securityinfos/:securityinfo?/mobmeditview9',
                    name: 'securityinfo_mobmeditview9',
                    meta: {
                        caption: 'securityinfo.views.mobmeditview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'securityinfos', parameterName: 'securityinfo' },
                            { pathName: 'mobmeditview9', parameterName: 'mobmeditview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/security-info-mob-medit-view9/security-info-mob-medit-view9.vue'),
                },
                {
                    path: 'shop_stars/:shop_star?/campmobmdview',
                    name: 'shop_star_campmobmdview',
                    meta: {
                        caption: 'shop_star.views.campmobmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_stars', parameterName: 'shop_star' },
                            { pathName: 'campmobmdview', parameterName: 'campmobmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-star-camp-mob-mdview/shop-star-camp-mob-mdview.vue'),
                },
                {
                    path: 'shoptypeappportalview',
                    name: 'shoptypeappportalview',
                    meta: {
                        caption: 'app.views.shoptypeappportalview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shoptypeappportalview', parameterName: 'shoptypeappportalview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/ungroup/shop-type-app-portal-view/shop-type-app-portal-view.vue'),
                },
                {
                    path: 'shop_infos/:shop_info?/distexppomobmdview',
                    name: 'shop_info_distexppomobmdview',
                    meta: {
                        caption: 'shop_info.views.distexppomobmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_infos', parameterName: 'shop_info' },
                            { pathName: 'distexppomobmdview', parameterName: 'distexppomobmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-info-dist-exp-po-mob-mdview/shop-info-dist-exp-po-mob-mdview.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/rejectionmoboptionview',
                    name: 'shop_examine_rejectionmoboptionview',
                    meta: {
                        caption: 'shop_examine.views.rejectionmoboptionview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'rejectionmoboptionview', parameterName: 'rejectionmoboptionview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-rejection-mob-option-view/shop-examine-rejection-mob-option-view.vue'),
                },
                {
                    path: 'task_infos/:task_info?/taskinfomobeditview',
                    name: 'task_info_taskinfomobeditview',
                    meta: {
                        caption: 'task_info.views.taskinfomobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'task_infos', parameterName: 'task_info' },
                            { pathName: 'taskinfomobeditview', parameterName: 'taskinfomobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/task-info-task-info-mob-edit-view/task-info-task-info-mob-edit-view.vue'),
                },
                {
                    path: 'manager_infos/:manager_info?/mybasicinfoview',
                    name: 'manager_info_mybasicinfoview',
                    meta: {
                        caption: 'manager_info.views.mybasicinfoview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'manager_infos', parameterName: 'manager_info' },
                            { pathName: 'mybasicinfoview', parameterName: 'mybasicinfoview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/manager-info-my-basic-info-view/manager-info-my-basic-info-view.vue'),
                },
                {
                    path: 'goods_infos/:goods_info?/detailmobeditview',
                    name: 'goods_info_detailmobeditview',
                    meta: {
                        caption: 'goods_info.views.detailmobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'goods_infos', parameterName: 'goods_info' },
                            { pathName: 'detailmobeditview', parameterName: 'detailmobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/goods-info-detail-mob-edit-view/goods-info-detail-mob-edit-view.vue'),
                },
                {
                    path: 'myportalview',
                    name: 'myportalview',
                    meta: {
                        caption: 'app.views.myportalview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'myportalview', parameterName: 'myportalview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/ungroup/my-portal-view/my-portal-view.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/pendingreviewmobeditview',
                    name: 'shop_examine_pendingreviewmobeditview',
                    meta: {
                        caption: 'shop_examine.views.pendingreviewmobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'pendingreviewmobeditview', parameterName: 'pendingreviewmobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-pending-review-mob-edit-view/shop-examine-pending-review-mob-edit-view.vue'),
                },
                {
                    path: 'shop_stars/:shop_star?/charactmobeditview',
                    name: 'shop_star_charactmobeditview',
                    meta: {
                        caption: 'shop_star.views.charactmobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_stars', parameterName: 'shop_star' },
                            { pathName: 'charactmobeditview', parameterName: 'charactmobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-star-charact-mob-edit-view/shop-star-charact-mob-edit-view.vue'),
                },
                {
                    path: 'goods_infos/:goods_info?/mgrmobmdview',
                    name: 'goods_info_mgrmobmdview',
                    meta: {
                        caption: 'goods_info.views.mgrmobmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'goods_infos', parameterName: 'goods_info' },
                            { pathName: 'mgrmobmdview', parameterName: 'mgrmobmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/goods-info-mgr-mob-mdview/goods-info-mgr-mob-mdview.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/cjmobwfdynaactionview',
                    name: 'shop_examine_cjmobwfdynaactionview',
                    meta: {
                        caption: 'shop_examine.views.cjmobwfdynaactionview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'cjmobwfdynaactionview', parameterName: 'cjmobwfdynaactionview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-cjmob-wfdyna-action-view/shop-examine-cjmob-wfdyna-action-view.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/shopmobeditview',
                    name: 'shop_examine_shopmobeditview',
                    meta: {
                        caption: 'shop_examine.views.shopmobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'shopmobeditview', parameterName: 'shopmobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-shop-mob-edit-view/shop-examine-shop-mob-edit-view.vue'),
                },
                {
                    path: 'shop_infos/:shop_info?/mobpickupmdview',
                    name: 'shop_info_mobpickupmdview',
                    meta: {
                        caption: 'shop_info.views.mobpickupmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_infos', parameterName: 'shop_info' },
                            { pathName: 'mobpickupmdview', parameterName: 'mobpickupmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-info-mob-pickup-mdview/shop-info-mob-pickup-mdview.vue'),
                },
                {
                    path: 'appindexview',
                    name: 'appindexview',
                    meta: {
                        caption: 'app.views.appindexview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'appindexview', parameterName: 'appindexview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/ungroup/app-index-view/app-index-view.vue'),
                },
                {
                    path: 'order_details/:order_detail?/goods_evaluates/:goods_evaluate?/mobmdview9',
                    name: 'goods_evaluate_mobmdview9',
                    meta: {
                        caption: 'goods_evaluate.views.mobmdview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'order_details', parameterName: 'order_detail' },
                            { pathName: 'goods_evaluates', parameterName: 'goods_evaluate' },
                            { pathName: 'mobmdview9', parameterName: 'mobmdview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/goods-evaluate-mob-mdview9/goods-evaluate-mob-mdview9.vue'),
                },
                {
                    path: 'goods_evaluates/:goods_evaluate?/mobmdview9',
                    name: 'goods_evaluate_mobmdview9',
                    meta: {
                        caption: 'goods_evaluate.views.mobmdview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'goods_evaluates', parameterName: 'goods_evaluate' },
                            { pathName: 'mobmdview9', parameterName: 'mobmdview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/goods-evaluate-mob-mdview9/goods-evaluate-mob-mdview9.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/tamobwfdynaactionview',
                    name: 'shop_examine_tamobwfdynaactionview',
                    meta: {
                        caption: 'shop_examine.views.tamobwfdynaactionview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'tamobwfdynaactionview', parameterName: 'tamobwfdynaactionview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-tamob-wfdyna-action-view/shop-examine-tamob-wfdyna-action-view.vue'),
                },
                {
                    path: 'task_infos/:task_info?/towntaskmamobmdview',
                    name: 'task_info_towntaskmamobmdview',
                    meta: {
                        caption: 'task_info.views.towntaskmamobmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'task_infos', parameterName: 'task_info' },
                            { pathName: 'towntaskmamobmdview', parameterName: 'towntaskmamobmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/task-info-town-task-ma-mob-mdview/task-info-town-task-ma-mob-mdview.vue'),
                },
                {
                    path: 'task_infos/:task_info?/comptaskmoboptionview',
                    name: 'task_info_comptaskmoboptionview',
                    meta: {
                        caption: 'task_info.views.comptaskmoboptionview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'task_infos', parameterName: 'task_info' },
                            { pathName: 'comptaskmoboptionview', parameterName: 'comptaskmoboptionview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/task-info-comp-task-mob-option-view/task-info-comp-task-mob-option-view.vue'),
                },
                {
                    path: 'shop_stars/:shop_star?/infomobeditview',
                    name: 'shop_star_infomobeditview',
                    meta: {
                        caption: 'shop_star.views.infomobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_stars', parameterName: 'shop_star' },
                            { pathName: 'infomobeditview', parameterName: 'infomobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-star-info-mob-edit-view/shop-star-info-mob-edit-view.vue'),
                },
                {
                    path: 'task_infos/:task_info?/pointtaskmamobmdview',
                    name: 'task_info_pointtaskmamobmdview',
                    meta: {
                        caption: 'task_info.views.pointtaskmamobmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'task_infos', parameterName: 'task_info' },
                            { pathName: 'pointtaskmamobmdview', parameterName: 'pointtaskmamobmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/task-info-point-task-ma-mob-mdview/task-info-point-task-ma-mob-mdview.vue'),
                },
                {
                    path: 'manager_infos/:manager_info?/basicinfoview',
                    name: 'manager_info_basicinfoview',
                    meta: {
                        caption: 'manager_info.views.basicinfoview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'manager_infos', parameterName: 'manager_info' },
                            { pathName: 'basicinfoview', parameterName: 'basicinfoview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/manager-info-basic-info-view/manager-info-basic-info-view.vue'),
                },
                {
                    path: 'shop_infos/:shop_info?/mobpickupview',
                    name: 'shop_info_mobpickupview',
                    meta: {
                        caption: 'shop_info.views.mobpickupview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_infos', parameterName: 'shop_info' },
                            { pathName: 'mobpickupview', parameterName: 'mobpickupview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-info-mob-pickup-view/shop-info-mob-pickup-view.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/security_infoms/:security_infom?/mobmdview9',
                    name: 'security_infom_mobmdview9',
                    meta: {
                        caption: 'securityinfo.views.mobmdview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'security_infoms', parameterName: 'security_infom' },
                            { pathName: 'mobmdview9', parameterName: 'mobmdview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/security-info-mob-mdview9/security-info-mob-mdview9.vue'),
                },
                {
                    path: 'security_infoms/:security_infom?/mobmdview9',
                    name: 'security_infom_mobmdview9',
                    meta: {
                        caption: 'securityinfo.views.mobmdview9.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'security_infoms', parameterName: 'security_infom' },
                            { pathName: 'mobmdview9', parameterName: 'mobmdview9' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/security-info-mob-mdview9/security-info-mob-mdview9.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/mobwfdynaactionview',
                    name: 'shop_examine_mobwfdynaactionview',
                    meta: {
                        caption: 'shop_examine.views.mobwfdynaactionview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'mobwfdynaactionview', parameterName: 'mobwfdynaactionview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-mob-wfdyna-action-view/shop-examine-mob-wfdyna-action-view.vue'),
                },
                {
                    path: 'applogoutview',
                    name: 'applogoutview',
                    meta: {
                        caption: 'app.views.applogoutview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'applogoutview', parameterName: 'applogoutview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/ungroup/app-logout-view/app-logout-view.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/mobwfdynaeditview',
                    name: 'shop_examine_mobwfdynaeditview',
                    meta: {
                        caption: 'shop_examine.views.mobwfdynaeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'mobwfdynaeditview', parameterName: 'mobwfdynaeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-mob-wfdyna-edit-view/shop-examine-mob-wfdyna-edit-view.vue'),
                },
                {
                    path: 'town_infos/:town_info?/mobpickupview',
                    name: 'town_info_mobpickupview',
                    meta: {
                        caption: 'town_info.views.mobpickupview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'town_infos', parameterName: 'town_info' },
                            { pathName: 'mobpickupview', parameterName: 'mobpickupview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/town-info-mob-pickup-view/town-info-mob-pickup-view.vue'),
                },
                {
                    path: 'order_details/:order_detail?/mobmdview',
                    name: 'order_detail_mobmdview',
                    meta: {
                        caption: 'order_detail.views.mobmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'order_details', parameterName: 'order_detail' },
                            { pathName: 'mobmdview', parameterName: 'mobmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/order-detail-mob-mdview/order-detail-mob-mdview.vue'),
                },
                {
                    path: 'town_infos/:town_info?/mobpickupmdview',
                    name: 'town_info_mobpickupmdview',
                    meta: {
                        caption: 'town_info.views.mobpickupmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'town_infos', parameterName: 'town_info' },
                            { pathName: 'mobpickupmdview', parameterName: 'mobpickupmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/town-info-mob-pickup-mdview/town-info-mob-pickup-mdview.vue'),
                },
                {
                    path: 'shop_stars/:shop_star?/basicmobeditview',
                    name: 'shop_star_basicmobeditview',
                    meta: {
                        caption: 'shop_star.views.basicmobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_stars', parameterName: 'shop_star' },
                            { pathName: 'basicmobeditview', parameterName: 'basicmobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-star-basic-mob-edit-view/shop-star-basic-mob-edit-view.vue'),
                },
                {
                    path: 'goods_infos/:goods_info?/nedetailmobeditview',
                    name: 'goods_info_nedetailmobeditview',
                    meta: {
                        caption: 'goods_info.views.nedetailmobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'goods_infos', parameterName: 'goods_info' },
                            { pathName: 'nedetailmobeditview', parameterName: 'nedetailmobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/goods-info-nedetail-mob-edit-view/goods-info-nedetail-mob-edit-view.vue'),
                },
                {
                    path: 'shop_infos/:shop_info?/shopinfomobeditview',
                    name: 'shop_info_shopinfomobeditview',
                    meta: {
                        caption: 'shop_info.views.shopinfomobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_infos', parameterName: 'shop_info' },
                            { pathName: 'shopinfomobeditview', parameterName: 'shopinfomobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-info-shop-info-mob-edit-view/shop-info-shop-info-mob-edit-view.vue'),
                },
                {
                    path: 'workbenchportalview',
                    name: 'workbenchportalview',
                    meta: {
                        caption: 'app.views.workbenchportalview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'workbenchportalview', parameterName: 'workbenchportalview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/ungroup/workbench-portal-view/workbench-portal-view.vue'),
                },
                {
                    path: 'shop_stars/:shop_star?/mymobmdview',
                    name: 'shop_star_mymobmdview',
                    meta: {
                        caption: 'shop_star.views.mymobmdview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_stars', parameterName: 'shop_star' },
                            { pathName: 'mymobmdview', parameterName: 'mymobmdview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-star-my-mob-mdview/shop-star-my-mob-mdview.vue'),
                },
                {
                    path: 'shop_infos/:shop_info?/mymobeditview',
                    name: 'shop_info_mymobeditview',
                    meta: {
                        caption: 'shop_info.views.mymobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_infos', parameterName: 'shop_info' },
                            { pathName: 'mymobeditview', parameterName: 'mymobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-info-my-mob-edit-view/shop-info-my-mob-edit-view.vue'),
                },
                {
                    path: 'shop_stars/:shop_star?/mobwizardview',
                    name: 'shop_star_mobwizardview',
                    meta: {
                        caption: 'shop_star.views.mobwizardview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_stars', parameterName: 'shop_star' },
                            { pathName: 'mobwizardview', parameterName: 'mobwizardview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-star-mob-wizard-view/shop-star-mob-wizard-view.vue'),
                },
                {
                    path: 'order_infos/:order_info?/moboptionview',
                    name: 'order_info_moboptionview',
                    meta: {
                        caption: 'order_info.views.moboptionview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'order_infos', parameterName: 'order_info' },
                            { pathName: 'moboptionview', parameterName: 'moboptionview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/order-info-mob-option-view/order-info-mob-option-view.vue'),
                },
                {
                    path: 'shop_examines/:shop_examine?/exppointmobeditview',
                    name: 'shop_examine_exppointmobeditview',
                    meta: {
                        caption: 'shop_examine.views.exppointmobeditview.caption',
                        parameters: [
                            { pathName: 'viewshell', parameterName: 'viewshell' },
                            { pathName: 'shop_examines', parameterName: 'shop_examine' },
                            { pathName: 'exppointmobeditview', parameterName: 'exppointmobeditview' },
                        ],
                        requireAuth: true,
                    },
                    component: () => import('@pages/cwc/shop-examine-exp-point-mob-edit-view/shop-examine-exp-point-mob-edit-view.vue'),
                },
            ...indexRoutes
            ]
        },
        {
            path: '/login/:login?',
            name: 'login',
            meta: {  
                caption: '登录',
                viewType: 'login',
                requireAuth: false,
                ignoreAddPage: true,
            },
            beforeEnter: (to: any, from: any, next: any) => {
                router.app.$store.commit('resetRootStateData');
                next();
            },
            component: () => import('@components/login/login.vue'),
        },
        {
            path: '/404',
            component: () => import('@components/404/404.vue')
        },
        {
            path: '/500',
            component: () => import('@components/500/500.vue')
        },
        {
            path: '*',
            redirect: 'appindexview'
        },
        ...globalRoutes
    ],
});

export default router;
